package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * 部门实体类
 */
@TableName("t_dept")
public class DeptBean {
    @TableId(value = "pk_deptId", type = IdType.AUTO)
    private Integer id;
    @TableField(value = "d_name")
    private String name;
    @TableField(exist = false)//标识该属性没有对应的列
    private Integer emNum;
    @TableField(exist = false)
    private List<EmployeeBean> emList;

    public DeptBean() {
    }

    public DeptBean(String name) {
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getEmNum() {
        return emNum;
    }

    public void setEmNum(Integer emNum) {
        this.emNum = emNum;
    }

    public List<EmployeeBean> getEmList() {
        return emList;
    }

    public void setEmList(List<EmployeeBean> emList) {
        this.emList = emList;
    }

    @Override
    public String toString() {
        return "DeptBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", emNum=" + emNum +
                ", emList=" + emList +
                '}' + '\n';
    }
}
